Methods of this kind are today already used in precision measuring technology in optical measurement methods described hereinafter. For example, video cameras having a one-dimensional CCD chip or a two-dimensional CCD chip are used in precision measuring technology and, with these cameras, a workpiece, which is to be measured, or portions thereof can be recorded. When the video camera is movably journalled relative to the workpiece to be measured in one or several dimensions (for example, when the video camera is utilized as a sensor in a coordinate measuring apparatus), also several different sections of the workpiece can be recorded and then brought into geometric relationship with each other. Gray value differences of the recorded image arise at the structures of a workpiece to be measured, such as especially at the edges. From these gray value differences, the 2D structure site can be determined. With the aid of this determination, the workpiece or individual features thereof, such as bores, can be measured in two dimensions.
The determination of the structure site from the gray values is, however, especially then not easily possible when the workpiece to be measured is illuminated with direct light. For a clear determination of a 2D structure site (such as especially an edge), the workpiece surface should exhibit a uniform brightness. Actually, however, the illumination with incident light emphasizes the structures on the surface of the workpiece to be measured so that no symmetrical intensity courses arise. For this reason, ancillary parameters must be obtained in the image evaluation. These ancillary parameters are characterized as so-called edge site criteria based upon which a structure site, especially an edge, can be determined as given. One such edge site criterion is, for example, a so-called differential edge site criterion which determines a structure site as given when the gray value differences of mutually adjacent image points exhibit a maximum change. Another edge site criterion is the so-called threshold value criterion which determines a structure site, especially an edge, as given when the gray values of an image element are within a pregiven range.
If not only two-dimensional features are to be determined, such as the outer dimensions of a printed circuit board, but instead a complete geometric determination in all three dimensions is to be undertaken then, in addition to the lateral two-dimensional image data, the spatial arrangement as to the distance data between the video camera and the workpiece surface is necessary. This distance data of the workpiece surface to the video camera can be obtained with the aid of focus methods. For this purpose, the focus of the video camera, however, has to be automatically adjusted to the workpiece surface. For this, different so-called focus criteria are known. A criterion of this kind is, for example, the contrast of the image recorded by the video camera. When this contrast is a maximum, it is assumed that the surface of the workpiece to be measured is disposed in the focus. Other criteria are, for example, the gray value differences between different image elements or the mean value of all gray image values or the standard deviation of gray image values.
It is therefore the objective in the above-mentioned measurement methods to determine as exactly as possible the position of the edge and/or the distance of the workpiece surface to the video camera in order to be able to measure the workpiece as accurately as possible. For this reason, the target quantities “2D structure site” and/or “focus site”, should be optimized. These target quantities, however, vary with different influence quantities. Influence quantities which act on the target quantity “2D structure site” are, for example, the brightness, the wavelength or the location of the illumination which illuminates the workpiece to be measured. It is especially difficult when several different illuminations are present. Another influence quantity, which acts on the target quantity “2D structure site” is the edge site criterion. An influence quantity which acts on the focus site is, for example, the selection of a suitable focus criterion.
In the past, the control data for the influence quantities were derived by the programmer of the measuring sequence subjectively from the video images of the video camera. These influence quantities are, for example: the control data for the different brightnesses of several illuminations; the selection of a suitable edge site criterion; or, the selection of a suitable focus criterion. On the basis of a video image of the camera, which was displayed on a monitor, the programmer of the measuring sequence has so shifted the illuminators and/or selected a focus criterion and/or an edge site criterion that, according to the subjective estimate of the programmer, an optimal measuring of the particular edge site appeared possible.
Stated otherwise, with such optical inspection systems and coordinate measuring apparatus, the task of the operator is to so adapt the illumination conditions while considering the optical characteristics of the measurement object that a focusing and obtaining of contact points (geometric contacting) is possible with highest accuracy and reproducibility. For this purpose, a selection of the focus criterion as well as the scanning method (edge site criterion) is required by the operator for determining the structure site corresponding to the characteristics of the measurement object and the illumination conditions. The quality of the determined results is therefore dependent upon the experience of the measuring technician.
It is disadvantageous with this conventional procedure that the adjustment of the influence quantities is coupled exclusively to the abilities of the programmer and especially an optimal selection of the influence quantities was practically not possible.
European patent publication 0,566,307 discloses an automatic focus control wherein only a single focus criterion is used, namely, the mean brightness of the image which is maximum in the focus. In order to determine in which direction a lens, which adjusts the focus, should be moved, the mean brightness is determined in several different frequency bands. The brightness measurement values of the different frequency bands of two mutually adjacent positions of the lens are then mathematically further processed so that the direction can be determined in which the lens has to be moved in order to get into the focus.
European patent publication 0,606,018 discloses an arrangement for automatically adjusting the focus of a video camera. Here, likewise only a focus criterion “contrast” is derived from the image data. The course of this focus criterion is determined in the horizontal image direction and in the vertical image direction. The two courses of the focus criterion are separately evaluated as to at which lens position these courses become maximum. The results are given to a so-called lens controller which shifts the position of the objective lenses. If one of these courses leads to no usable result, the focus is adjusted by the lens controller only on the basis of the other course. If, in contrast, both courses lead to a result, then the focus is adjusted on the basis of one of the two courses.
U.S. Pat. No. 4,691,365 discloses a light control for an image reading apparatus or scanner. This light control is based on the evaluation of the digital image for which a shading correction is simultaneously undertaken. The control described herein is not usable because of the completely different requirements which are necessary in the measurement of a structure site in the optical precision measuring technology.
U.S. Pat. No. 4,202,014 discloses an automatic exposure control for a television camera wherein the light quantity, which incidents in the television camera, is controlled by a pulse-shaped opening and closing of the shutter. The exposure control described here can also not be used because of the completely different requirements which are necessary for the measurement of a structure site in the optical precision measurement technology.
A dissertation entitled “Beleuchtungs—und Fokusregelungen für die objektivierte optische Präzisionsantastung in der Koordinatenmessung” of Uwe Nehse, was published in the edition “Wissenschaft, Unterbereich Maschinenbau, Tectum Verlag Marburg (2001) ISBN 3-8288-1207-4, wherein essential components of the invention are published.